package com.example.customapp.mycustomapp.Directory;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.customapp.mycustomapp.R;
import com.example.customapp.mycustomapp.base.BaseActivity;
import com.example.customapp.mycustomapp.view.AutoCardView;

import butterknife.Bind;
import butterknife.ButterKnife;

public class DirectoryActivity extends BaseActivity {

    @Bind(R.id.iv_back)
    ImageView ivBack;
    @Bind(R.id.title)
    TextView title;
    @Bind(R.id.cv_act)
    AutoCardView cvAct;
    @Bind(R.id.cv_receiver)
    AutoCardView cvReceiver;
    @Bind(R.id.cv_service)
    AutoCardView cvService;
    @Bind(R.id.cv_provider)
    AutoCardView cvProvider;
    @Bind(R.id.cv_custom_view)
    AutoCardView cvCustomView;
    @Bind(R.id.cv_auto_listview)
    AutoCardView cvAutoListview;
    private TextView textView;

    @Override
    public void initWidget() {

    }

    @Override
    public void widgetClick() {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_directory);
        ButterKnife.bind(this);
        textView = (TextView) findViewById(R.id.text);
        //textView.setBackground(ContextCompat.getDrawable(this, R.drawable.ic_launcher));
        ivBack = (ImageView) findViewById(R.id.iv_back);
        ivBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        cvCustomView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(DirectoryActivity.this, MyCustomViewActivity.class));
            }
        });
        cvAutoListview.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(DirectoryActivity.this, MyAutoListViewActivity.class));
            }
        });
    }

}
